<script>on mouseUpput SystemFolder() & "CD Remote Programs" into meend mouseUp</script>
</part>
<part>
<id>3</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>30</top>
<right>256</right>
<bottom>256</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<textHeight>12</textHeight>
<name>theText</name>
<script>on mouseUpput cd fld CDRemotePrograms into sourceFileput short name of this stack into thisStackput "My CD Collection" into newStackif there is not a file sourceFile thenanswer "File:" && quote & sourceFile & quote && "was not found!" ¬with "Get A Life"exit mouseUpend ifput resList (sourceFile) into temprepeat with i = 1 to number of lines in tempif line i of temp contains "STR#" thenexit repeatend ifend repeatif i >= number of lines in temp thenanswer "No discs found in:" && quote & sourceFile & quote && "!" ¬with "Get A Life"exit mouseUpend ifcreate stack newStack in new windowif the result is not empty thenanswer "Could not create" && quote & newStack & quote ¬& ". The file may already exist or the disk may be locked." ¬with "Get A Life"exit mouseUpend ifset script of stack newStack to script of mesend firstCard to stack newStackdoMenu "Close Stack"copyRes thisStack, newStack, "STR#", 8078 -- required for CD XCMDs.copyRes thisStack, newStack, "XFCN", cdDiscTitlecopyRes thisStack, newStack, "XCMD", cdEjectcopyRes thisStack, newStack, "XCMD", cdOpencopyRes thisStack, newStack, "XCMD", cdPlayTrackcopyRes thisStack, newStack, "XCMD", cdSetDiscTitlecopyRes thisStack, newStack, "XFCN", cdStatusgo to stack newStack in new windowput "cleanup" && quote & thisStack & quote & comma && quote ¬& sourceFile & quote into theMessagesend theMessage to stack newStackend mouseUpon cleanup useStack, sourceFilestart using stack useStackput resList (sourceFile) into temprepeat with i = 1 to number of lines in tempif line i of temp contains "STR#" thenput item 3 of line i of temp into resourceIDcopyRes sourceFile, short name of this stack, "STR#", resourceIDaddDisc listDiscContents (resourceID)killRes "STR#", resourceIDend ifend repeatstop using stack useStacksort cards of this stack by bg fld discTitleset script of me to restOfScript (script of me, "***")doMenu "Compact Stack"show all cardsend cleanup-- return delimited list of a CD's title and tracksfunction listDiscContents resourceIDrepeat with i = 1 to 999put getStr (resourceID, i) into tempStringif tempString is empty then exit repeatput tempString & return after theStringend repeatreturn theStringend listDiscContentson addDisc discInfoif bg fld 1 is not empty then doMenu "New Card"put line 1 of discInfo into bg fld discTitleput line 2 to 999 of discInfo into bg fld trackTitlesend addDiscon firstCard trackScriptcreateBgField1createBgField2createBgButton1createBgButton2set script of bg fld "discTitle" to partOfScript(script of me, "~~~")set script of bg fld "trackTitles" to partOfScript(script of me, "@@@")set script of bg btn "Go Prev" to partOfScript(script of me, "<<<")set script of bg btn "Go Next" to partOfScript(script of me, ">>>")end firstCardon createBgField theTop, theLeft, theBottom, theRightchoose field tooldoMenu "Background"drag from theLeft, theTop to theRight, theBottom with commandKeydoMenu "Background"choose browse toolend createBgFieldon createBgField1createBgField 0, 0, 15, 256set name of bg fld 1 to "discTitle"set style of bg fld 1 to rectangleset lockText of bg fld 1 to trueset textSize of bg fld 1 to 9set textFont of bg fld 1 to Genveaset textStyle of bg fld 1 to boldset textAlign of bg fld 1 to centerend createBgField1on createBgField2createBgField 17, 0, 235, 256set name of bg fld 2 to "trackTitles"set style of bg fld 2 to scrollingset lockText of bg fld 2 to trueset textSize of bg fld 2 to 9set textFont of bg fld 2 to Genveaset textStyle of bg fld 2 to boldend createBgField2on createBgButton theTop, theLeft, theBottom, theRightchoose button tooldoMenu "Background"drag from theLeft, theTop to theRight, theBottom with commandKeydoMenu "Background"choose browse toolend createBgButtonon createBgButton1createBgButton 235, 0, 256, 30set name of bg btn 1 to "Go Prev"set icon of bg btn 1 to "Prev Arrow"end createBgButton1on createBgButton2createBgButton 235, 226, 256, 256set name of bg btn 2 to "Go Next"set icon of bg btn 2 to "Next Arrow"end createBgButton2-- Return text of theScript located between two occurences of-- theToken & return.function partOfScript theScript, theTokenput restOfScript (theScript, theToken) into theScriptdelete char offset (theToken & return, theScript) to 9999 of theScriptdelete last line of theScriptreturn theScriptend partOfScript-- Return text of theScript minus all text before theToken & return.function restOfScript theScript, theTokendelete char 1 to offset (theToken & return, theScript) of theScriptdelete first line of theScriptreturn theScriptend restOfScript-- Permanent script of bg btn "Go Prev of the new stack is below.-- The partOfScript() routine will cut this script here ---> <<<on mouseUpvisual effect wipe rightdo (short name of me)end mouseUp-- The partOfScript() routine will cut this script here ---> <<<-- Permanent script of bg btn "Go Next" of the new stack is below.-- The partOfScript() routine will cut this script here ---> >>>on mouseUpvisual effect wipe leftdo (short name of me)end mouseUp-- The partOfScript() routine will cut this script here ---> >>>-- Permanent script of bg fld "discTitle" of the new stack is below.-- The partOfScript() routine will cut this script here ---> ~~~on mouseUpedit script of this stackend mouseUp-- The partOfScript() routine will cut this script here ---> ~~~-- Permanent script of bg fld "trackTitles" of the new stack is below.-- The partOfScript() routine will cut this script here ---> @@@on mouseUpselect the clickLineif the selection is empty thenbeepelseplayThis word 2 of the clickLine && bg fld discTitlewait 1 secondselect after last char of meend ifend mouseUp-- The partOfScript() routine will cut this script here ---> @@@-- Permanent script of the new stack is below.-- The restOfScript() routine will cut this script here ---> ***-- Stack created by Claussoft International's "CD Programs Reader"on playThis tuneInfoif tuneInfo is empty then exit playThisput word 1 of tuneInfo into trackNumberput word 2 to 99 of tuneInfo into discTitleif getCD (discTitle) then CDPlayTrack (trackNumber)end playThisfunction getCD discTitleglobal xxxCDRefNumCDOpenput CDDiscTitle() into currTitleif currTitle = discTitle then return true -- Correct CD found-- No CD foundif xxxCDRefNum is empty or xxxCDRefNum = 0 thenanswer "Please insert the Compact Disc:" & return & " " ¬& discTitle & "…" with "Cancel" or "OK"if it = "Cancel" thenreturn falseelsemountCDreturn getCD(discTitle)end ifend if-- Incorrect CD foundif currTitle is empty then put "Untitled" into currTitleanswer "The current Compact Disc is" ¬&& quote & currTitle & "." & quote & return ¬& "It can be renamed to" && quote & discTitle & quote && "or ejected."¬with "Cancel" or "Rename CD" or "Eject CD"if it = "Cancel" then return falseif it = "Rename CD" thenrenameCD currTitle, discTitleelseCDEjectend ifreturn getCD(discTitle)end getCDon mountCDrepeat until CDStatus() >= 0CDOpenend repeatend mountCDon renameCD oldTitle, newTitleanswer "Are you sure that you want to rename the CD:" ¬&& quote & oldTitle & quote && "to" && quote & newTitle & quote & "?"¬with "Cancel" or "Rename CD"if it = "Rename CD" then CDSetDiscTitle(newTitle)end renameCD</script>